package com.jackson.springstartdev.controller;

/*
 * Author: JacksonCoder
 * FileName: HelloController
 * Version: 1.0.0
 */

import com.jackson.springstartdev.pojo.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping("/boot")
    public String hello(){
        return "Hello SpringBoot !!! I'm begin to learn SpringBoot ! ";    //  I'm begin to learn SpringBoot !
    }

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @RequestMapping("/jdbc")
    public String jdbc(){
        return jdbcTemplate.toString();
    }


    @Autowired
    private Person person;

    @RequestMapping("/person")
    public String showPerson(){

        return person.toString();
    }

}
